'use strict';
const {
  Model
} = require('sequelize');
module.exports = (sequelize, DataTypes) => {
  class Good extends Model {
    /**
     * Helper method for defining associations.
     * This method is not a part of Sequelize lifecycle.
     * The `models/index` file will call this method automatically.
     */
    static associate(models) {
      // define association here
    }
  }
  Good.init({
    name: DataTypes.STRING,
    price: DataTypes.INTEGER,
    unit: DataTypes.INTEGER,
    goodsInfo: DataTypes.STRING,
    timeBuying: DataTypes.DATE,
    inputPerson: DataTypes.INTEGER,
    inputTime: DataTypes.DATE,
    inputNum: DataTypes.INTEGER,
    totalInput: DataTypes.INTEGER,
    stockNum: DataTypes.INTEGER,
    type: DataTypes.INTEGER,
    category: DataTypes.INTEGER,
    critical: DataTypes.INTEGER
  }, {
    sequelize,
    modelName: 'Good',
  });
  return Good;
};